﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

/// This file is a catch all of the different Flags that are sent to the MSAS
/// API.  
namespace Microsoft.MSAS.ManagedAPI
{
    //typedef enum MSAS_CANONICAL_FLAGS
    //{
    //    MSAS_CANONICAL_NONE = 0

    //    // Doesn't adds scheme (http for example) if not already on the URL passed in.
    //    // If this flag is set and there is no scheme on the URL, the function will
    //    // return a binary encoded URL in the form of http://canonicalizer.ucsuri.tcs/XX...
    //    //
    //    , MSAS_CANONICAL_DONTADDSCHEME      = 0x1 << 0

    //    // Causes failure if cannot attempt to convert an IDN domain to a standard ASCII
    //    // form because the normalize.dll isn't present on the system (like on XP).
    //    //
    //    , MSAS_CANONICAL_MUSTNORM           = 0x1 << 1

    //    // Doesn't truncate the URL if parts are longer than allowed.  Instead if this
    //    // is set and URL parts are too long the entire URL will be returned as
    //    // a binary encoded URL in the form of http://canonicalizer.ucsuri.tcs/XX...
    //    //
    //    , MSAS_CANONICAL_NOTRUNCATE         = 0x1 << 3
    //};

    [Flags]
    public enum MRS_Canonical_Flags
    {
        MSAS_Canonical_None = 0,
        MSAS_Canonical_DontAddScheme = 0x1 << 0,
        MSAS_Canonical_MustNorm = 0x1 << 1,
        MSAS_Canonical_NoTruncate = 0x1 << 3
    };

    //typedef enum MSAS_PROCESSREQUEST_FLAGS
    //{
    //    MSAS_PROCESSREQUEST_FLAG_NONE = 0

    //    // Causes the MsasProcessRequest*() function to enumerate all
    //    // the hashes in the request data without evaluating the bloom
    //    // data.  In fact the out params of the MsasProcessRequestProc
    //    // callback will be NULL since they are not used for enumeration.
    //    //
    //    , MSAS_PROCESSREQUEST_FLAG_ENUMONLY     = (0x1 << 0)  // 0x00000001

    //    //, MSAS_PROCESSREQUEST_FLAG_         = (0x1 << 1)  // 0x00000002
    //    //, MSAS_PROCESSREQUEST_FLAG_         = (0x1 << 2)  // 0x00000004
    //    //, MSAS_PROCESSREQUEST_FLAG_         = (0x1 << 3)  // 0x00000008
    //};
    [Flags]
    public enum MRS_ProcessRequest_Flags
    {
        MSAS_ProcessRequestFlag_None = 0,
        MSAS_ProcessRequestFlag_EnumOnly = 0x1 << 0
    };


    //enum CATEGORIZE_FLAGS
    //{
    //    CATEGORIZE_FLAG_NONE = 0

    //    // This can be set if not allowed to return 'need more data'.  It is not required to ever pass in this flag,
    //        // but it helps make the categorize more efficient when it is known that the web query has already been done.
    //        // This flag should not be set if the cache interface can return item not found.  If this happens for a required
    //        // piece of data and this flag is set, Categorize will return E_UNEXPECTED.
    //        //
    //    , CATEGORIZE_FLAG_NOMOREDATA = 0x1 << 0

    //    // This could be implemented to not allocate the list of category ids (which is stored in the IRefUrlCategoryVector).
    //    // IUrlCategory::GetId() would always return 0, but it could be assumed that the IRefUrlCategoryVector is in the same
    //    // order as the pdwCategoryIds list passed in to Categorize().
    //    //
    //    //, CATEGORIZE_FLAG_NOCATIDS = 0x1 << 1
    //};
    [Flags]
    public enum MRS_Categorize_Flags
    {
        Categorize_Flag_None = 0,
        Categorize_Flag_NoMoreData = 0x1 << 0
    };

    public static class MRS_HRESULTS
    {
        public const uint S_OK = 0;
        public const uint S_FALSE = 1;
    }
}
